CC = gcc
C_FLAGS = -g -Wall
INCLUDE =
LIBS =
#wildcard对c文件进行展开
SRCS := $(wildcard *.c)
#将SRCS中后缀.c替换成空，即可执行程序的名字与cpp名字相同
TARGET  := $(patsubst %.c, %, $(SRCS))
OBJDIR = .

.c:
	$(CC) $(C_FLAGS) -o $@ $< $(INCLUDE) $(LIBS)
#可移动到指定的OBJDIR目录
#mv $@ $(OBJDIR)
all: $(TARGET) clean
clean:
	rm -rf *.o






